<template>
  <div class="NewPeoManage">
    <!--面包屑导航区域-->
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>招聘信息</el-breadcrumb-item>
      <el-breadcrumb-item>新人管理</el-breadcrumb-item>
    </el-breadcrumb>
    <!--卡片视图·-->
    <el-card class="box-card">
      <el-row :gutter="20">
        <el-col :span="7">
          <el-input placeholder="请输入内容" v-model="queryInfo.query" clearable @clear="getUserList" @change="getUserList">
            <el-button slot="append" icon="el-icon-search" @click="getUserList"></el-button>
          </el-input>
        </el-col>
        <el-col :span="4">
          <!-- <el-button type="primary" @click="addDialogVisible=true">添加用户</el-button> -->
        </el-col>
      </el-row>
      <!--用户列表区域-->
      <el-table :data="userList" style="width: 100%" border stripe>
        <el-table-column type="index" label="#" align="center" fixed="left"></el-table-column>
        <el-table-column prop="username" label="姓名" width="180" align="center" fixed></el-table-column>
        <el-table-column prop="email" label="邮箱" min-width="180"></el-table-column>
        <el-table-column prop="mobile" label="电话" min-width="180"></el-table-column>
        <el-table-column prop="role_name" label="角色" min-width="180"></el-table-column>
        <el-table-column prop="place" label="籍贯" min-width="250"></el-table-column>
        <el-table-column prop="graduate_school" label="毕业院校" min-width="180"></el-table-column>
        <el-table-column prop="record" label="学历" min-width="180"></el-table-column>
        <el-table-column prop="professional" label="专业" min-width="180"></el-table-column>
        <el-table-column prop="politica" label="政治面貌" min-width="180"></el-table-column>
        <el-table-column prop="national" label="民族" min-width="180"></el-table-column>
        <el-table-column prop="home_address" label="家庭住址" min-width="180"></el-table-column>
        <el-table-column fixed="right" label="操作" width="200">
          <!--修改按钮-->
          <el-tooltip effect="dark" content="查看" placement="top" :enterable="false">
            <el-button type="primary" icon="el-icon-setting" size="mini" @click="showEditDaialog(scope.row)">
            </el-button>
          </el-tooltip>
          <!--删除按钮-->
          <el-tooltip effect="dark" content="编辑" placement="top" :enterable="false">
            <el-button type="danger" icon="el-icon-edit" size="mini" @click="removeUserById(scope.row.id)">
            </el-button>
          </el-tooltip>
        </el-table-column>
      </el-table>
      <!--分页-->
      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
        :current-page="queryInfo.pagenum" :page-sizes="[2, 5, 10, 30]" :page-size="queryInfo.pagesize"
        layout="total, sizes, prev, pager, next, jumper" :total="total">
      </el-pagination>
    </el-card>
  </div>
</template>

<script>
  import situationList from './situationList.js'
  export default {
    data() {
      return {
        queryInfo: { //请求用户列表的参数
          query: '', //搜索关键字
          pagenum: 1, //页数
          pagesize: 10, //每页的size
        },
      }
    },
    created() {
      this.userList = situationList.row;
    }
  }
</script>

<style lang="less" scoped>

</style>